package test01;

import com.le.t1.person;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class s {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ServerSocket serverSocket=new ServerSocket(8888);
        Socket socket =serverSocket.accept();


        ObjectInputStream in=new ObjectInputStream(socket.getInputStream());
        person person= (person) in.readObject();
        System.out.println(person.toString());


        in.close();
        socket.close();
        serverSocket.close();
    }

}
